<template>
  <div class="container contract-review pb">
    <p class="bread">
      <a href="#/index/lawyer-evaluate">律师评价</a> >
      <a href="javascript:void(0);" class="font-s-16">评价详情</a>
    </p>
    <div class="bg-c-fff box-border">
      <h3 class="tm-title">客户信息</h3>
      <div class="companyInfo">
        <p>企业名称：{{account}}</p>
        <p>地址：{{address}}</p>
        <p>电话：{{phone}}</p>
        <p>邮箱：{{email}}</p>
      </div>
      <div class="companyInfo">
        <span>律师：{{lawyerName}}</span>
      </div>
    </div>
    <div class="content">
      <h3 class=" bg-c-fff">评价详情</h3>
      <div class="box bg-c-fff">
        <evaluate ref="num" disabled></evaluate>
        <textarea v-model="evaluateOne" readonly="readonly">
        </textarea>
      </div>
    </div>
  </div>
</template>
<script type="text/javascript">
import Evaluate from '../components/Evaluate'
export default {
  components: {
    Evaluate
  },
  data() {
    return {
      evaluateOne: '',
      userId: '',
      account: '',
      address: '',
      phone: '',
      email: '',
      lawyerName: ''
    }
  },
  mounted() {
    this.$http.post('/evaluate/query/LawyerEvaluate/byId', {
      id: this.$route.query.id
    }).then(data => {
      if (data.data.httpCode === 200) {
        this.$refs.num.index = data.data.data.satisfactory
        this.evaluateOne = data.data.data.evaluateContentOne
        this.userId = data.data.data.customId
        this.lawyerName = data.data.data.lawyerName
        this.getUserData()
      } else {
        console.log(data.data.msg)
        this.$toasted.show(data.data.msg)
      }
    }).catch(err => {
      console.log(err)
    })
  },
  methods: {
    getUserData() {
      console.log(this.userId)
      this.$http.get('/memberBusniess/query/busniessInfo/byMemberId', {
        params: {
          memberId: this.userId
        }
      }).then(data => {
        if (data.data.httpCode === 200) {
          this.account = data.data.data.account
          this.address = data.data.data.address.replace(/,/g, '')
          this.phone = data.data.data.phone
          this.email = data.data.data.email
        } else {
          console.log(data.data.msg)
          this.$toasted.show(data.data.msg)
        }
      }).catch(err => {
        console.log(err)
      })
    }
  }
}

</script>
<style type="text/css" scoped>
.box-border {
  border: 1px solid #ddd;
}

.tm-title {
  line-height: 40px;
  padding-left: 35px;
  font-size: 14px;
  color: #282828;
  border-bottom: 1px solid #ddd;
}

.content .box {
  padding: 20px 40px;
  margin-bottom: 15px;
}


.content .box .box-border-top {
  border-top: 1px solid #ddd;
}

.pb {
  padding-bottom: 50px;
}

.content h3 {
  border-bottom: 1px solid #dddddd;
  color: #282828;
  line-height: 40px;
  padding-left: 40px;
  font-size: 14px;
  margin-top: 15px;
}

textarea {
  width: 100%;
  height: 120px;
  margin-top: 15px;
  border-color: #ddd;
  padding: 10px 7px;
}

.companyInfo {
  padding: 10px 36px;
}

.companyInfo p,
.companyInfo span {
  line-height: 30px;
}

.companyInfo span {
  margin-right: 20px;
}

</style>
